package com.huike.clues.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huike.clues.domain.vo.MpAssignmentVo;
import com.huike.common.entity.MPTbClue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Description TODO
 * @Author 何俊杰
 * @Date 2023-08-29 16:43
 */
@Mapper
public interface MpClueMapper extends BaseMapper<MPTbClue> {
	/**
	 * 查询线索管理列表
	 * @param mpTbClue
	 * @return
	 */
	List<MPTbClue> selectClue(MPTbClue mpTbClue);

	/**
	 *批量分配
	 * @param mpAssignmentVo
	 * @return
	 */


	/**
	 * 修改线索管理
	 * @param mpTbClue
	 * @return
	 */
	int updateMpTbClue(MPTbClue mpTbClue);

	/**
	 *修改线索状态
	 * @param id
	 * @param status
	 */
	@Update("update tb_clue set naxt_time = null , status = #{status} where id = #{id}")
	void resetNextTimeAndStatus(Long id, String status);

	/**
	 * 根据id查找
	 * @param id
	 * @return
	 */
	MPTbClue findId(Long id);
}
